﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="CompanyJobList.aspx.cs" Inherits="Member_Job_JobList"
    Title="  企业职位管理" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">

    <script type="text/javascript" src="../../js/jquery-cn.js"></script>

    <script type="text/javascript" src="../../js/jquery.js"></script>

    <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
          
    function checkbox(){
        // 找到所有的 input 元素
        var ctllist = document.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要删除吗？");
        }    
    }  
    
        function checkbox1(){
        // 找到所有的 input 元素
        var ctllist = document.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要暂停此职位吗？");
        }    
    }  
    
     function checkbox2(){
        // 找到所有的 input 元素
        var ctllist = document.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm("确定要发布此职位吗？");
        }    
    }          
    </script>
    <div class="inkg mar_top">
    <form id="form1" action="">
             <strong class="inkgt">
                企业职位管理</strong>
            <div class="intip mar_top">
                <strong class="intipt">提&nbsp;示：</strong>
                <p>
                    ·修改信息：审核通过才能上网，可以增加商机有效期及提升信息排名。</p>
                <p>
                    ·在操作选项中设置信息推荐，信息通过审核后可以在商铺首页显示推荐产品信息</p>
                <i class="lt"></i><i class="lb"></i>
            </div>
                <div class="inso mar_top">
                    职位标题：<asp:TextBox ID="txtpostion" runat="server" Height="17"></asp:TextBox>
                    <asp:Button ID="btnSelect" OnClick="btnSelect_Click" runat="server" Text="立即查询" CssClass="del">
                    </asp:Button>
                </div>
            <div class="intab mar_top" id="intab">
                <ul class="intabt">
                    <li id="menu1" class="<%=verify=="0"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='CompanyJobList.aspx?Verify=0'">全部的</li>
                    <li id="menu2" class="<%=verify=="3"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='CompanyJobList.aspx?Verify=3'">发布中的</li><li
                        id="menu3" class="<%=verify=="1"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='CompanyJobList.aspx?Verify=1'">暂停的</li><li
                            id="menu4" class="<%=verify=="2"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='CompanyJobList.aspx?Verify=2'">已过期的</li>
                </ul>
             <div class="intabc" id="intabc">
                        <table cellpadding="0" cellspacing="0" border="0" class="edtb">
                            <thead>
                        <tr>
                            <td width="40">
                                选项
                            </td>
                            <td >
                                职位名称
                            </td>
                            <td width="70">
                                发布时间
                            </td>
                            <td width="70">
                                截止时间
                            </td>
                            <td width="80">
                                是否通过审核
                            </td>
                            <td width="70">
                                是否推荐
                            </td>
                            <td  width="40">
                                状态
                            </td>
                            <td  width="40">
                                修改
                            </td>
                            <td  width="40">
                                删除
                            </td>
                        </tr>
                        </thead>
                        <tbody>
                         <asp:Repeater  ID="grdJob" runat="server"  > 
                    <ItemTemplate>
                        <tr>
                            <td width="40" align="center">
                                <input runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID")%>' id="chk" name="chk"
                                    type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            </td>
                            <td align="center">
                                        <a style="text-decoration: underline; border-bottom-color: Red; border-bottom: 0 solid black;"
                                href='JobEdit.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>
                                <%# Eval("Position")%>
                            </a>
                            </td>
                            <td width="70" align="center">
                                 <%# GetShortDate(DataBinder.Eval(Container.DataItem, "AddDate").ToString())%>
                            </td>
                            <td align="center" width="70">
                               <%# GetShortDate(DataBinder.Eval(Container.DataItem, "EndDate").ToString())%>
                            </td>
                            <td  width="80">
                                <%# turncn(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "verify")))%>
                            </td>
                            <td  width="70">
                                <%# recommend(Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "isRecommend")))%>
                            </td>
                            <td  width="40">
                            <%# DataBinder.Eval(Container.DataItem, "state")%>
                            </td>
                            <td width="40">
                            <a href='JobEdit.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>修改</a>
                            </td>
                            <td width="40">
                                <asp:LinkButton ID="xiugai" runat="server" Text="删除" OnClientClick="return confirm('你确认要删除吗?');"  Enabled="true" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID")%>'
                                    OnCommand="xiugai_Command" />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater >
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="9">
                                    <p class="zi1">
                                                     <input runat="server" class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="CheckMinoAll();" />
                                        全选
                                        <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                                            OnClientClick="return CheckSelect();return confirm('你确认要删除吗?');" Text="批量删除" CssClass="del"  />
                <asp:Button ID="BtnRecord" runat="server" Text="暂停" CssClass="i_button2" OnClientClick="return CheckSelect();"
                    OnClick="BtnRecord_Click" />
                <asp:Button ID="Button1" runat="server" Text="发布" CssClass="i_button2" OnClientClick="return CheckSelect();"
                    OnClick="Button1_Click" />
                                    </p>
                                    <p class="zi2">
                                        <uc1:PageNo ID="PageNo1" runat="server" />
                                    </p>
                                </td>
                            </tr>
                        </tfoot>
                        </table>
                         <input type="hidden" id="CheckedIDS" name="CheckedIDS" value="0" runat="server" />
            <asp:HiddenField ID="HiddenField1" runat="server" />
        </div>
            </div>
    </form>
        </div>
</asp:Content>
